<template>
	<view style="height: 100rpx;" class="fixed-bottom flex align-cente border-top bg-white">
		<input type="text" v-model="content" value="" class="border flex-1 rounded bg-light justify-center align-center mr-1" style="padding: 5rpx; margin-top: 20rpx;margin-left: 20rpx;" placeholder="文明发言" @confirm="submit"/>
		<view @click="submit" class="iconfont icon-fabu flex align-center justify-center animate__animated "hover-class="animate__jello"  style="width: 100rpx; size: 100rpx;"></view>
	</view>
</template>

<script>
	export default {
		// props: {
		// 	focus: {
		// 		type: Boolean,
		// 		default: false
		// 	},
		// },
		data() {
			return {
				content: ""
			}
		},
		methods: {
			submit() {
				console.log(this.content)
				// 是否为空
				if (this.content === '') {
					return uni.showToast({
						title: '消息不能为空',
						icon: 'none'
					});
				}
				this.$emit('submit',this.content)
				// 清空输入框
				this.content = ''
			}
		},
	}
</script>

<style>
</style>
